home *** CD-ROM | disk | FTP | other *** search
- =========================
- = tcp-mail.v38 Feb, 90 =
- =========================
- As an aside, versions 900212 and later supports a file called \SPOOL\REWRITE.
- This file is searched after the S command is typed on the mailbox and
- the address is rewritten according to the file. An entry like
-
- *@sm*.ampr.org $1%sm$2.ampr.org@sics.se
-
- would rewrite "foo@sm0xxx.ampr.org" into "foo%sm0xxx.ampr.org@sics.se".
- The rewrite file is particulary useful when you are receiving bulletins
- from a packet BBS. The entry
-
- *@mblbbs mblbbs
-
- would map a message for "all@mblbbs" into the local username (i.e. mail area)
- "mblbbs".
- Newer versions of NOS will allow for a third entry on the rewrite line,
- namely an 'r' character. This character indicates that the rewrite file
- should be read once again. This allows for entries like:
-
- *@myhost.ampr.org $1 r
- *!* $2@$1 r
-
- where the first line simply removes the string "@myhost.ampr.org" from the
- end of the address, when applicable, and recurses the rewrite file.
- The second line would map "host1!host2!user" into "host2!user@host1" and
- recurse the rewrite file.
- Unfortunately, "*%* $1@$2" would not map "user%host2%host1" into
- "user%host2@host1" but rather into "user@host2%host1", so one has to be
- careful.
-
- So, NOS now has great flexibility in the way it handles mail addresses.
- The rewrite file is scanned first, and it can be used to rewrite almost
- any kind of mail addresses. Then, the alias file is scanned. It is used
- to map local usernames into one or more addresses. Please note that the
- differences are that the rewrite file cannot handle multiple addresses,
- while the alias file only operates on local addresses.
-
- ===============================================================================
- = tcp-mail.v74 Oct, 90 =
- =========================
- When a message is entered to the mailbox, the address is rewritten
- according to rules in the /spool/rewrite file. The first word on
- each line in the rewrite file is an address using wildcards. If that
- address matches the address you are trying to rewrite, it is rewritten
- according to the format of the second word. If the third word is an 'r',
- the rewrite procedure will be repeated, now using the new address as
- input.
-
- Ok, so here is a sample /spool/rewrite file for a machine with the
- hostname sk0we.ampr.org:
-
- *!* $2@$1 r
- *@sk0we.ampr.org $1 r
- *@*.ampr.org $1@$2.ampr.org
- sm0rgv@* sm0rgv
- *@w3ya* w3ya
- *@k* $1%k$2%w3iwi.ampr.org@tomcat.gsfc.nasa.gov
-
- The first line means that addresses written in the "host!user" format
- should be rewritten to "user@host" and then the rewrite procedure
- should be repeated.
-
- The second line converts the address "user@sk0we.ampr.org" into the
- local address "user" and then repeats the rewrite procedure.
-
- The third line seems to do nothing. It just converts "user@host.ampr.org"
- to "user@host.ampr.org". But it also exits the rewrite procedure
- since the line does not end with an 'r'. Any address ending with
- ".ampr.org" will not be converted further.
-
- The line "sm0rgv@* sm0rgv" will keep mail for sm0rgv on the local
- machine even if it is mistakenly addressed to another BBS, such as
- "sm0rgv@w3iwi". The line will however fail to convert addresses such
- as "sm0rgv@w3iwi.ampr.org" because of the line described in the
- previous paragraph.
-
- The line "*@w3ya* w3ya" will leave mail for "user@w3ya" in the local
- message area named "w3ya". The same goes for mail using some sort of
- hierarchical routing designators such as "user@w3ya.state.na.us". The
- only exception is for mail addressed to "user@w3ya.ampr.org" as
- described above.
-
- The line "*@k* $1%k$2%w3iwi.ampr.org@tomcat.gsfc.nasa.gov" is an
- example of how to establish an Internet "wormhole." Suppose I want to
- forward all mail to stations with callsigns starting with K to W3IWI
- through the Internet. The line quoted above would do it. But if the
- mail for "user@kxxxx" is received by w3iwi.ampr.org with SMTP, there
- might be some problems because the rewrite file is not scanned when
- mail is received with SMTP. This could easily be changed however. Let
- me know if this is causing you any inconveniencies.
-
- Anders
-